// Copyright 2023 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package output

import "testing"

func TestTruncate(t *testing.T) {
	tests := []QueryParses{
		Converts("TRUNCATE ONLY name"),
		Converts("TRUNCATE TABLE ONLY name"),
		Converts("TRUNCATE name"),
		Converts("TRUNCATE TABLE name"),
		Converts("TRUNCATE name *"),
		Converts("TRUNCATE TABLE name *"),
		Parses("TRUNCATE ONLY name , ONLY name"),
		Parses("TRUNCATE TABLE ONLY name , ONLY name"),
		Parses("TRUNCATE name , ONLY name"),
		Parses("TRUNCATE TABLE name , ONLY name"),
		Parses("TRUNCATE name * , ONLY name"),
		Parses("TRUNCATE TABLE name * , ONLY name"),
		Parses("TRUNCATE ONLY name , name"),
		Parses("TRUNCATE TABLE ONLY name , name"),
		Parses("TRUNCATE name , name"),
		Parses("TRUNCATE TABLE name , name"),
		Parses("TRUNCATE name * , name"),
		Parses("TRUNCATE TABLE name * , name"),
		Parses("TRUNCATE ONLY name , name *"),
		Parses("TRUNCATE TABLE ONLY name , name *"),
		Parses("TRUNCATE name , name *"),
		Parses("TRUNCATE TABLE name , name *"),
		Parses("TRUNCATE name * , name *"),
		Parses("TRUNCATE TABLE name * , name *"),
		Unimplemented("TRUNCATE ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name * , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name RESTART IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE name * , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , name RESTART IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE name , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE name * , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , name * RESTART IDENTITY"),
		Unimplemented("TRUNCATE ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name * , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name * , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , name CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE ONLY name , name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name , name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name , name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE name * , name * CONTINUE IDENTITY"),
		Unimplemented("TRUNCATE TABLE name * , name * CONTINUE IDENTITY"),
		Parses("TRUNCATE ONLY name CASCADE"),
		Parses("TRUNCATE TABLE ONLY name CASCADE"),
		Parses("TRUNCATE name CASCADE"),
		Parses("TRUNCATE TABLE name CASCADE"),
		Parses("TRUNCATE name * CASCADE"),
		Parses("TRUNCATE TABLE name * CASCADE"),
		Parses("TRUNCATE ONLY name , ONLY name CASCADE"),
		Parses("TRUNCATE TABLE ONLY name , ONLY name CASCADE"),
		Parses("TRUNCATE name , ONLY name CASCADE"),
		Parses("TRUNCATE TABLE name , ONLY name CASCADE"),
		Parses("TRUNCATE name * , ONLY name CASCADE"),
		Parses("TRUNCATE TABLE name * , ONLY name CASCADE"),
		Parses("TRUNCATE ONLY name , name CASCADE"),
		Parses("TRUNCATE TABLE ONLY name , name CASCADE"),
		Parses("TRUNCATE name , name CASCADE"),
		Parses("TRUNCATE TABLE name , name CASCADE"),
		Parses("TRUNCATE name * , name CASCADE"),
		Parses("TRUNCATE TABLE name * , name CASCADE"),
		Parses("TRUNCATE ONLY name , name * CASCADE"),
		Parses("TRUNCATE TABLE ONLY name , name * CASCADE"),
		Parses("TRUNCATE name , name * CASCADE"),
		Parses("TRUNCATE TABLE name , name * CASCADE"),
		Parses("TRUNCATE name * , name * CASCADE"),
		Parses("TRUNCATE TABLE name * , name * CASCADE"),
		Unimplemented("TRUNCATE ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , name RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , name * RESTART IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , name CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE ONLY name , name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name , name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name , name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE name * , name * CONTINUE IDENTITY CASCADE"),
		Unimplemented("TRUNCATE TABLE name * , name * CONTINUE IDENTITY CASCADE"),
		Parses("TRUNCATE ONLY name RESTRICT"),
		Parses("TRUNCATE TABLE ONLY name RESTRICT"),
		Parses("TRUNCATE name RESTRICT"),
		Parses("TRUNCATE TABLE name RESTRICT"),
		Parses("TRUNCATE name * RESTRICT"),
		Parses("TRUNCATE TABLE name * RESTRICT"),
		Parses("TRUNCATE ONLY name , ONLY name RESTRICT"),
		Parses("TRUNCATE TABLE ONLY name , ONLY name RESTRICT"),
		Parses("TRUNCATE name , ONLY name RESTRICT"),
		Parses("TRUNCATE TABLE name , ONLY name RESTRICT"),
		Parses("TRUNCATE name * , ONLY name RESTRICT"),
		Parses("TRUNCATE TABLE name * , ONLY name RESTRICT"),
		Parses("TRUNCATE ONLY name , name RESTRICT"),
		Parses("TRUNCATE TABLE ONLY name , name RESTRICT"),
		Parses("TRUNCATE name , name RESTRICT"),
		Parses("TRUNCATE TABLE name , name RESTRICT"),
		Parses("TRUNCATE name * , name RESTRICT"),
		Parses("TRUNCATE TABLE name * , name RESTRICT"),
		Parses("TRUNCATE ONLY name , name * RESTRICT"),
		Parses("TRUNCATE TABLE ONLY name , name * RESTRICT"),
		Parses("TRUNCATE name , name * RESTRICT"),
		Parses("TRUNCATE TABLE name , name * RESTRICT"),
		Parses("TRUNCATE name * , name * RESTRICT"),
		Parses("TRUNCATE TABLE name * , name * RESTRICT"),
		Unimplemented("TRUNCATE ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , name RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , name * RESTART IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , ONLY name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , name CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE ONLY name , name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE ONLY name , name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name , name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name , name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE name * , name * CONTINUE IDENTITY RESTRICT"),
		Unimplemented("TRUNCATE TABLE name * , name * CONTINUE IDENTITY RESTRICT"),
	}
	RunTests(t, tests)
}
